using System;
using System.Collections.Generic; 
using System.Linq;  
using System.Text;    
using System.Data.Linq.Mapping;
using System.Data.Linq;

namespace MRSite.Entity  
{
    /// <summary>
    /// 店铺分类
    /// </summary>
     [Table(Name = "shop_category")] 
	 public class ShopCategory : Entity
	{ 
		/// <summary>
		///
		/// </summary>
		[Column(Name = "id", IsPrimaryKey = true, CanBeNull = false, IsVersion = true)]
		public override int id{ get; set; } 

		/// <summary>
		///标题
		/// </summary>
		[Column(Name = "title")]
		public String title{ get; set; } 

		/// <summary>
		///父节点ID
		/// </summary>
		[Column(Name = "parent_id")]
		public int parent_id{ get; set; } 

		/// <summary>
		///排序
		/// </summary>
		[Column(Name = "sort_id")]
		public int sort_id{ get; set; } 

		/// <summary>
		///等级
		/// </summary>
		[Column(Name = "level_id")]
		public int level_id{ get; set; } 

		/// <summary>
		///类别列表
		/// </summary>
		[Column(Name = "class_list")]
		public String class_list{ get; set; } 

		/// <summary>
		///外部链接
		/// </summary>
		[Column(Name = "link_url")]
		public String link_url{ get; set; } 

		/// <summary>
		///图片地址
		/// </summary>
		[Column(Name = "img_url")]
		public String img_url{ get; set; } 

		/// <summary>
		///内容
		/// </summary>
		[Column(Name = "contents")]
		public String contents{ get; set; } 

		/// <summary>
		///
		/// </summary>
		[Column(Name = "seo_title")]
		public String seo_title{ get; set; } 

		/// <summary>
		///
		/// </summary>
		[Column(Name = "seo_keywords")]
		public String seo_keywords{ get; set; } 

		/// <summary>
		///
		/// </summary>
		[Column(Name = "seo_description")]
		public String seo_description{ get; set; } 

		/// <summary>
		///频道ID(0:积分商城；1：分销产品)
		/// </summary>
		[Column(Name = "channel_id")]
		public int channel_id{ get; set; }

        private EntitySet<Shop> _shopList;
        /// <summary>
        /// 文章
        /// </summary>
        [Association(Storage = "_shopList", ThisKey = "id", OtherKey = "category_id")]
        public EntitySet<Shop> ShopList
        {
            get { return this._shopList; }
            set { this._shopList.Assign(value); }
        }

        public ShopCategory()
        {
            this._shopList = new EntitySet<Shop>();
        }
	 } 
}    


